package com.nmgsr.beans.service;



import com.nmgsr.beans.requestdao.LoginReq;
import com.nmgsr.beans.requestdao.PageReq;
import com.nmgsr.beans.responsedao.ArticleRes;
import com.nmgsr.beans.responsedao.BaseRes;
import com.nmgsr.beans.requestdao.TokenReq;
import com.nmgsr.beans.responsedao.CompanyRes;
import com.nmgsr.beans.responsedao.LoginRes;
import com.nmgsr.beans.responsedao.PtmsBorrowRecordRes;
import com.nmgsr.beans.responsedao.PtmsToolRes;
import com.nmgsr.beans.responsedao.PtmsUserInfoRes;
import com.nmgsr.beans.responsedao.PtmsVideoCaptureRes;
import com.nmgsr.beans.responsedao.PtmsWarnScrapRes;
import com.nmgsr.beans.responsedao.PtmsWarnTestRes;
import com.nmgsr.beans.responsedao.SysRoleRes;
import com.nmgsr.beans.responsedao.TokenRes;
import com.nmgsr.nettools.net.retrofit.BaseListResponse;
import com.nmgsr.nettools.net.retrofit.BaseResponse;
import com.nmgsr.nettools.net.retrofit.PagedResult;
import com.nmgsr.nettools.net.retrofit.WebBaseRes;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

public interface Api {
    @POST("api/sysAuth/login")
    Observable<BaseResponse<LoginRes>> userLogin(@Body LoginReq body);
    @GET("api/sysUser/baseInfo")
    Observable<BaseResponse<PtmsUserInfoRes>> getUserInfo();
    @GET("api/sysRole/list")
    Observable<BaseResponse<List<SysRoleRes>>> getRoleList();
    @POST("api/ptmsTool/page")
    Observable<BaseResponse<PagedResult<PtmsToolRes>>> getPtmsToolList(@Body PageReq body);
    @POST("api/ptmsWarnScrap/page")
    Observable<BaseResponse<PagedResult<PtmsWarnScrapRes>>> getPtmsWarnScrapList(@Body PageReq body);
    @POST("api/ptmsWarnTest/page")
    Observable<BaseResponse<PagedResult<PtmsWarnTestRes>>> getPtmsWarnTestList(@Body PageReq body);
    @POST("api/ptmsBorrowRecord/page")
    Observable<BaseResponse<PagedResult<PtmsBorrowRecordRes>>> getPtmsBorrowRecordList(@Body PageReq body);
    @POST("api/ptmsVideoCapture/page")
    Observable<BaseResponse<PagedResult<PtmsVideoCaptureRes>>> getPtmsVideoCaptureList(@Body PageReq body);

    @FormUrlEncoded
    @POST("user/login")
    Observable<WebBaseRes> login(@FieldMap Map<String, String> request);
    @POST("security/auth/login")
    Observable<BaseRes<TokenRes>> getToken(@Body TokenReq body);

    @GET("livestock/enterprise")
    Observable<BaseRes<CompanyRes>> getEnterprise(@QueryMap Map<String, String> request);

    @GET("article")
    Observable<BaseRes<ArticleRes>> getArticle(@QueryMap Map<String, String> request);

}
